<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../style.css" rel="stylesheet" type="text/css">
    <title>PETSc: Documentation: Changes: 3.4</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1><!--begin-->Documentation: Changes: 3.4<!--end--></h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../../index.html">Home</a></li>
        <li><a href="../../download/index.html">Download</a></li>
        <li><a href="../../features/index.html">Features</a></li>
        <li>
          <a href="../../documentation/index.html">Documentation</a>
          <ul>
            <li><a href="../index.html">Manual pages and Users Manual</a></li>
            <li><a href="../referencing.html">Citing PETSc</a></li>
            <li><a href="../tutorials/index.html">Tutorials</a></li>
            <li><a href="../installation.html">Installation</a></li>
            <li><a href="../saws.html">SAWs</a></li>
            <li>
              <a href="index.html">Changes</a>
              <ul>
                <li><a href="dev.html">dev</a></li>
                <li><a href="310.html">3.10</a></li>
                <li><a href="39.html">3.9</a></li>
                <li><a href="38.html">3.8</a></li>
                <li><a href="37.html">3.7</a></li>
                <li><a href="36.html">3.6</a></li>
                <li><a href="35.html">3.5</a></li>
                <li><span class="current">3.4</span></li>
                <li><a href="33.html">3.3</a></li>
                <li><a href="32.html">3.2</a></li>
                <li><a href="31.html">3.1</a></li>
                <li><a href="300.html">3.0.0</a></li>
                <li><a href="233.html">2.3.3</a></li>
                <li><a href="232.html">2.3.2</a></li>
                <li><a href="231.html">2.3.1</a></li>
                <li><a href="230.html">2.3.0</a></li>
                <li><a href="221.html">2.2.1</a></li>
                <li><a href="220.html">2.2.0</a></li>
                <li><a href="216.html">2.1.6</a></li>
                <li><a href="215.html">2.1.5</a></li>
                <li><a href="213.html">2.1.3</a></li>
                <li><a href="212.html">2.1.2</a></li>
                <li><a href="211.html">2.1.1</a></li>
                <li><a href="21.html">2.1.0</a></li>
                <li><a href="2029.html">2.0.29</a></li>
                <li><a href="2028.html">2.0.28</a></li>
                <li><a href="2024.html">2.0.24</a></li>
                <li><a href="2022.html">2.0.22</a></li>
                <li><a href="2018-21.html">2.0.18-21</a></li>
                <li><a href="2017.html">2.0.17</a></li>
                <li><a href="2016.html">2.0.16</a></li>
                <li><a href="2015.html">2.0.15</a></li>
              </ul>
            </li>
            <li><a href="../bugreporting.html">Bug Reporting</a></li>
            <li><a href="../codemanagement.html">Code Management</a></li>
            <li><a href="../faq.html">FAQ</a></li>
            <li><a href="../license.html">License</a></li>
            <li><a href="../linearsolvertable.html">Linear Solver Table</a></li>
          </ul>
        </li>
        <li><a href="../../publications/index.html">Applications/Publications</a></li>
        <li><a href="../../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../../miscellaneous/external.html">External Software</a></li>
        <li><a href="../../developers/index.html">Developers Site</a></li>
      </ul>
    </div>

    <!--begin-->

    <style type="text/css">
      h2 {
        color: red;
      }

      h4 {
        font-weight: bold;
        text-decoration: underline;
      }
    </style>

    <div id="main">

      <div align="center">
        <h2><a name="CHANGES">CHANGES in the PETSc 3.4 Version</a></h2>
      </div>

      <h4>General:</h4>
      <ul>
        <li>PetscGetTime() is replaced with PetscTime(), in C you must include petsctime.h to use</li>
        <li>PetscViewerBinaryMatlabOpen() and friends are all removed, simply use PetscViewerBinaryOpen() followed by PetscViewerPushFormat(viewer,PETSC_VIEWER_BINARY_MATLAB)</li>
        <li>Users should use new <tt>PetscFunctionBeginUser</tt> in there code instead of <tt>PetscFunctionBegin</tt> to get more relevant diagnostics.</li>
        <li>Replaced the hodge-podge of -xxx_view -xxx_view_yyy with a single consistent scheme: -xxx_view [ascii,binary,draw,socket,matlab,vtk][:filename][:ascii_info,ascii_info_detail,ascii_matlab,draw_contour,etc].</li>
        <li>In PETSc options files, the comment characters <tt>!</tt> and <tt>%</tt> are no longer supported, use <tt>#</tt>.</li>
        <li>
          <tt>PetscFList</tt> and <tt>PetscOList</tt> have been changed to <tt>PetscFunctionList</tt> and <tt>PetscObjectList</tt>.
          <tt>PetscFunctionListFind()</tt> no longer takes the path to a shared library or the string name of the function.
          Plugins distributed as shared libraries should register their implementations by calling suitable <tt>XXRegister()</tt> functions from within their <tt>PetscDLLibraryRegister_basename()</tt>, see documentation for PetscDLLibraryOpen().
        </li>
        <li>
          MatRegisterDynamic(), PCRegisterDynamic(), KSPRegisterDynamic(), etc., have been simplified to drop the string function name argument, and are simply named MatRegister(), PCRegister(), KSPRegister(), etc.
          PetscObjectComposeFunctionDynamic() also drops the string function name argument and is called PetscObjectComposeFunction().
        </li>
        <li>
          The configure options <tt>--with-c-support</tt> and <tt>--with-c++-support</tt> have been removed. A PETSc
          library built using C or C++ can be called from either C or C++. The primary functional reason to
          use <tt>--with-clanguage=C++</tt> is to use <tt>std::complex</tt> data types. Other users will likely
          prefer <tt>--with-clanguage=C</tt> (the default) because it compiles somewhat faster. The --with-c-support option is no longer needed 
          because it is now the default behavior when using --with-clanguage=c++.
        </li>
      </ul>
      <h4>Logging:</h4>
      <h4>config/configure.py:</h4>
      <h4>PetscSF:</h4>
      <ul>
        <li>
          PetscSF was split into interface and impls.
          The internal interfaces PetscSFGetDataTypes(), PetscSFGetWindow(), PetscSFFindWindow(), andd PetscSFRestoreWindow() were made private.
          (It is unlikely that any users were calling these routines.)
          PetscSFSetSynchronizationType() and the enum PetscSFSynchronizationType were renamed to PetscSFWindowSetSyncType() and PetscSFWindowSyncType respectively.
        </li>
        <li>
          The location arguments to <tt>PetscSFGetRanks()</tt> were changed from <tt>PetscMPIInt</tt> (aka <tt>int</tt>) to <tt>PetscInt</tt> to (eventually) support very large local memory.
          The "window" implementation will not support such large sizes due to technical limitations of MPI one sided and "basic" does not currently due to PetscGatherMessageLengths().
        </li>
      </ul>
      <h4>IS:</h4>
      <ul>
        <li>
          PetscSection was moved to IS and has become a PetscObject, thus reference counting works as usual, with functions like DMSetDefaultSection() taking a reference to the PetscSection.
          The caller is thus obliged to release their reference using PetscSectionDestroy().
        </li>
      </ul>
      <h4>PF:</h4>
      <h4>Vec:</h4>
      <ul>
        <li>The options -vec_view,  -vec_view_matlab, -vec_view_socket, -vec_view_binary, -vec_view_draw, -vec_view_lg have been replace by a more general systematic scheme of -vec_view [ascii,binary,draw, or socket][:filename][:format], for these cases they are exactly:  -vec_view  -vec_view ::ascii_matlab -vec_view socket -vec_view binary -vec_view draw -vec_view draw::draw_lg</li>
        <li>VecDotNorm2() now returns the square of the norm in a real number (PetscReal) rather than the real part of a complex number (PetscScalar)</li>
        <li>Added VecDotRealPart()</li>
        <li>
          The private header <tt>petsc/private/vecimpl.h</tt> is no longer included by <tt>petscvec.h</tt>.
          Users requiring direct access to internal members of Vec may need to include the private header, but may want to explain their use case to <tt>petsc-maint@mcs.anl.gov</tt> so that we can provide a stable API.
        </li>
        <li>
          VecGetArray()/VecRestoreArray() and VecGhostGetLocalForm()/VecGhostRestoreLocalForm() are logically collective operations because their use invalidates norms, which must be known collectively.
          This is not a change in behavior, but prior documentation did not mark them as collective.
          Users should not rely on use such as lazy access occurring inside loops that could have length zero on some processors because it could lead to deadlock in a subsequent norm computation.
          VecGetArrayRead() and VecRestoreArrayRead() are not collective.
        </li>
      </ul>
      <h4>VecScatter:</h4>
      <h4>Mat:</h4>
      <ul>
        <li>The options -mat_view, -mat_view_info, -mat_view_info_detailed -mat_view_matlab, -mat_view_socket, -mat_view_binary, -mat_view_draw, -mat_view_contour have been replace by a more general systematic scheme of -mat_view [ascii,binary,draw, or socket][:filename][:format], for these cases they are exactly:  -mat_view -mat_view ::ascii_info  -mat_view ::ascii_info_detail -mat_view ::ascii_matlab -mat_view socket -mat_view binary -mat_view draw -mat_view draw::draw_contour </li>
        <li><tt>MatGetArray()/MatRestoreArray()</tt> have been remove d. Use <tt>MatDenseGetArray()/MatDenseRestoreArray()</tt> or <tt>MatSeqAIJGetArray()/MatSeqAIJRestoreArray()</tt></li>
        <li>PLAPACK interface has been removed.</li>
        <li>MatGetRowIJ() and MatGetColumnIJ() have been made const-correct; the index arrays have always been read-only.</li>
        <li>MatRestoreRow() and MatRestoreRowIJ() now zero their arguments.  They should never have been accessed after restoring.</li>
        <li>MatPermute() can now be used for MPIAIJ, but contrary to prior documentation, the column IS should be parallel and contain only owned columns.</li>
      </ul>

      <h4>PC:</h4>
      <ul>
        <li>The default behavior for PCILU was changed from -pc_factor_shift_type nonzero to -pc_factor_shift_type inblock
          (note it is -sub_pc_factor_shift_type if the ILU is used inside block Jacobi). If previously you had convergence of iterative solvers with ILU and now for the same
          code you get zero pivot errors or PC setup errors then try the option -pc_factor_shift_type nonzero. </li>
        <li>Merged PCBJacobiSetUseTrueLocal(), <tt>-pc_bjacobi_true_local</tt>, PCKSPSetUseTrue(), <tt>-pc_ksp_true</tt>, PCCompositeSetUseTrue() <tt>-pc_composite_true</tt>, PCFieldSplitSetRealDiagonal <tt>-pc_fieldpslit_real_diagonal</tt> to PCSetUseAmat(), <tt>-pc_use_amat</tt>.</li>
        <li>Added <tt>PCISSetSubdomainDiagonalScaling()</tt> if a user wants to set a custom scaling at the interface.</li>
        <li>Added initial version of FETI-DP in PCBDDC code.</li>
        <li>Added <tt>PCBDDCCreateFETIDPOperators()</tt> for creation of FETI-DP mat and the related Dirichlet preconditioner using an already existing PCBDDC object.</li>
        <li>Added <tt>PCBDDCMatFETIDPGetRHS()</tt> for assembling of right-hand side of FETI-DP linear system.</li>
        <li>Added <tt>PCBDDCMatFETIDPGetSolution()</tt> for assembling of physical solution from FETI-DP solution.</li>
        <li>Added support to deal with linear systems with non-trivial kernels via <tt>PCBDDCSetNullSpace()</tt>.</li>
        <li>Added <tt>PCBDDCSetMaxLevels()</tt> to control the maximum number of levels when doing multilevel.</li>
        <li>Added <tt>PCBDDCSetCoarseningRatio()</tt> to control the coarsening ratio when doing multilevel.</li>
        <li>Added <tt>PCISSetUseStiffnessScaling()</tt> to build partition of unity using local matrices' diagonal.</li>
        <li>Removed PETSc interface to <a href="http://www.columbia.edu/~ma2325/prometheus/">Prometheus</a>. Use "-pc_type gamg -pc_gamg_type agg" as alternative.</li>
        <li>PC_FIELDSPLIT_SCHUR_PRE_DIAG changed to PC_FIELDSPLIT_SCHUR_PRE_A11.</li>
      </ul>
      <h4>KSP:</h4>
      <ul>
        <li> Replace -ksp_view_binary with either -ksp_view_mat binary - save matrix to the default binary viewer or-ksp_view_pmat binary -
           save matrix to the default binary viewer followed by -ksp_view_rhs binary - save right hand side vector to the default binary viewer. Also many other
           combinations are possible.</li>
      </ul>
      <h4>SNES:</h4>
       <ul>
        <li> Added added -snes_check_jacobian a very powerful way to check if your Jacobian is correct for small problems, see SNESUpdateCheckJacobian()</li>
        <li> SNESVIRS  "virs" changed to SNESVINEWTONRSLS vinewtonrsls to clarify exactly what they do</li>
        <li>  SNESVISS  "viss" changed to SNESVINEWTONSSLS vinewtonssls </li>
        <li>  SNESLS  "ls" changed to SNESNEWTONLS newtonls </li>
        <li>  SNESTR  "tr" changed to SNESNEWTONTR newtontr </li>
        <li>  SNESDefaultComputeJacobian(), SNESDefaultComputeJacobianColor(), SNESDefaultObjectiveComputeFunctionFD(), SNESDefaultConverged() changed to SNESComputeJacobianDefault(), SNESComputeJacobianDefaultColor(), SNESConvergedDefault(), SNESObjectiveComputeFunctionDefaultFD() to match more consistent naming standards.</li>
        <li> Added nonlinear additive Schwarz as SNESNASM "nasm" </li>
        <li> Added helper SNES type SNESASPIN "aspin" for setting up additive Schwarz preconditioned inexact Newton.</li>
        <li> Added Anderson Mixing as SNESANDERSON "anderson"</li>
        <li>SNESGetSNESLineSearch() and SNESSetSNESLineSearch() renamed to SNESGetLineSearch() and SNESSetLineSearch().</li>
        </ul>

      <h4>SNESLineSearch:</h4>
      <h4>TS:</h4>
      <ul>
        <li>
          Option <tt>-ts_monitor_solution</tt> changed to <tt>-ts_monitor_draw_solution</tt>.
          See <a href="http://www.mcs.anl.gov/petsc-master/docs/manualpages/TS/TSSetFromOptions.html">TSSetFromOptions</a> for additional monitoring options.
        </li>
        <li>
          TSSetExactFinalTime() now takes an enum instead of PetscBool, which includes a new feature <tt>TS_EXACTFINALTIME_MATCHSTEP</tt> that adjusts time step sizes to match an exact final time.
          See <a href="http://www.mcs.anl.gov/petsc-master/docs/manualpages/TS/TSExactFinalTimeOption.html">TSExactFinalTimeOption</a>.
        </li>
      </ul>
      <h4>DM/DA:</h4>
      <ul>
        <li>DMDAGetCoordinateDA(), DMDAGet/SetCoordinates(), DMDAGet/SetGhostedCoordinates(), and
        DMComplexGetCoordinateVec() have been removed in favor of DMGetCoordinateDM(), DMGet/SetCoordinates(), and DMGet/SetCoordinatesLocal()</li>
        <li>DMDASetLocalFunction() and DMDASetLocalJacobian() have been replaced with DMDASNESSetFunctionLocal() and DMDASNESSetJacobianLocal() -- note
            that the calling sequences of these functions are different and also the calling sequence of the Jacobian function you provide</li>
        <li>DMSetFunction() and DMSetJacobian() have been removed use SNESSetFunction() and SNESSetJacobian() instead, note the calling sequences are
            slightly different</li>
        <li>DMDACreatePatchIS() for getting the indices of an arbitrary subdomain on a DMDA </li>
        <li>DMDAGet/SetOverlap(),DMDAGet/SetOffset() for manipulating DMDA subdomains </li>
        <li>DMCreateDomainDecompositionScatters() gives VecScatter objects for transferring to/from subdomain DMs </li>
        <li>DMGet/RestoreNamedLocalVector()</li>
      </ul>
      <h4>DMComplex/DMPlex:</h4>
      <ul>
        <li>DMComplex was renamed to DMPlex.</li>
        <li>There is now a manual section on unstructured grids.</li>
      </ul>
      <h4>DMMesh:</h4>
      <ul>
        <li>This is deprecated in favor of DMPlex, and will be removed in 3.5.</li>
        <li>SectionRealToVecDM() was created to removed overloading.</li>
      </ul>
      <h4>DMMG:</h4>
      <h4>PetscViewer:</h4>
      <h4>SYS:</h4>
      <ul>
        <li><tt>PetscPClose()</tt> has an additional argument to return a nonzero error code without raising an error.</li>
        <li>Added <tt>PetscSortMPIInt()</tt> and <tt>PetscSortRemoveDupsMPIInt()</tt>.</li>
      </ul>
      <h4>AO:</h4>
      <h4>Sieve:</h4>
      <h4>Fortran:</h4>
      <h4>ExternalPackages:</h4>
      <ul>
        <li>Added Elemental interface </li>
        <li>Remove Spooles interface </li>
      </ul>
    </div>

    <!--end-->

    <hr>

  </body>
</html>
